package cn.pugle.base.classloader;

/**
 * @author tzp
 * @since 2018/2/8
 */
public class AClass extends APClass {
    public int i = 10;
    public int h = 10;

    static {
        System.out.println("AClass static code");
    }

    public AClass() {
        System.out.println("AClass new");
    }

    public static void sm(String[] args) {
        System.out.println("AClass static method:sm");
    }

    public BClass refB0() {
        return null;
    }

    public BClass refB1() {
        return new BClass();
    }

    public Object refB2() {
        return BClass.class;
    }

    public static void main(String[] args) {
        AClass a = new AClass();//父类子类, 不会有两个对象, 那也太蠢了
        System.out.println(a.h);//10
        a.printMyH();//30
    }
}
